cucDefine(['common'], function(common){
    let {loadStyle, commonVar} = common;
    class TitleJH3 extends HTMLElement {
        constructor(text = "", withStyle = true) {
            super();
            let head3 = document.createElement("h3");
            head3.className = "jh-title3";
            if(text) head3.innerText = text;
            else head3.innerText = this.innerHTML;
            if(withStyle){
                let shadow = this.attachShadow({mode: 'open'});
                loadStyle(shadow, commonVar.rootPath + "/assets/component/title/title.css");
                shadow.appendChild(head3);
            } else {
                this.appendChild(head3);
            }
            // this.onMounted();
        }
    }
    return TitleJH3;
});